package cn.iocoder.yudao.module.handguard.dal.mysql.userbasetable10;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.handguard.dal.dataobject.userbasetable10.UserBaseTable10DO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.handguard.controller.app.userbasetable10.vo.*;

/**
 * 商业写字楼按揭贷款 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface UserBaseTable10Mapper extends BaseMapperX<UserBaseTable10DO> {

    default PageResult<UserBaseTable10DO> selectPage(UserBaseTable10PageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<UserBaseTable10DO>()
                .eqIfPresent(UserBaseTable10DO::getUserId, reqVO.getUserId())
                .eqIfPresent(UserBaseTable10DO::getArea, reqVO.getArea())
                .eqIfPresent(UserBaseTable10DO::getBuildingStructure, reqVO.getBuildingStructure())
                .eqIfPresent(UserBaseTable10DO::getHouseType, reqVO.getHouseType())
                .eqIfPresent(UserBaseTable10DO::getAreaOfStructure, reqVO.getAreaOfStructure())
                .eqIfPresent(UserBaseTable10DO::getLocationFloor, reqVO.getLocationFloor())
                .eqIfPresent(UserBaseTable10DO::getIsFrontage, reqVO.getIsFrontage())
                .eqIfPresent(UserBaseTable10DO::getIsLease, reqVO.getIsLease())
                .eqIfPresent(UserBaseTable10DO::getRent, reqVO.getRent())
                .betweenIfPresent(UserBaseTable10DO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(UserBaseTable10DO::getId));
    }

    default List<UserBaseTable10DO> selectList(UserBaseTable10ExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<UserBaseTable10DO>()
                .eqIfPresent(UserBaseTable10DO::getUserId, reqVO.getUserId())
                .eqIfPresent(UserBaseTable10DO::getArea, reqVO.getArea())
                .eqIfPresent(UserBaseTable10DO::getBuildingStructure, reqVO.getBuildingStructure())
                .eqIfPresent(UserBaseTable10DO::getHouseType, reqVO.getHouseType())
                .eqIfPresent(UserBaseTable10DO::getAreaOfStructure, reqVO.getAreaOfStructure())
                .eqIfPresent(UserBaseTable10DO::getLocationFloor, reqVO.getLocationFloor())
                .eqIfPresent(UserBaseTable10DO::getIsFrontage, reqVO.getIsFrontage())
                .eqIfPresent(UserBaseTable10DO::getIsLease, reqVO.getIsLease())
                .eqIfPresent(UserBaseTable10DO::getRent, reqVO.getRent())
                .betweenIfPresent(UserBaseTable10DO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(UserBaseTable10DO::getId));
    }

}
